#ifndef SECTIONVIEWMAINWINDOW_H
#define SECTIONVIEWMAINWINDOW_H

#include <QMainWindow>

namespace Ui { class SectionViewMainWindow; }
template <typename Type> class GraphNode;
class QGridLayout;
class AbstractSectionView;
class Navigator;
class NavigatorBar;
class SectionInfo;

class SectionViewManager : public QWidget
{
    Q_OBJECT
public:
    explicit SectionViewManager(QWidget *parent = 0);
    ~SectionViewManager();

private:
    enum RequestOrigin
    {
        SectionViewRequest,
        NavigatorRequest
    };

public slots:
    void initialize();

signals:
    void notifyHint (QString title, QString message);
    void notifyInformation (QString title, QString message);
    void notifyWarning (QString title, QString message);

private slots:
    void showSection (GraphNode<SectionInfo>* sectionNode, RequestOrigin requestOrigin, bool isSiblingNode);
    void showSectionFromSectionView (GraphNode<SectionInfo>* sectionNode, bool isSiblingNode);
    void showSectionFromNavigator(const QVariant &data);

private:
    GraphNode<SectionInfo>* m_sectionViewGraph;
    AbstractSectionView* m_currentSectionView;
    NavigatorBar* m_navigatorBar;
    Navigator* m_navigator;
    QGridLayout* m_gridLayout;
};

#endif // SECTIONVIEWMAINWINDOW_H
